const db = uniCloud.database()
exports.main = async (event, context) => {
  const { title, content, images, author,mobile,type } = event
  return await db.collection('topics').add({
    title,
    content,
    images,
    author,
    mobile,
    likes: 0,
    dislikes: 0,
    type,
    create_time: Date.now()
  })
}